/**
 * Created by yangxin on 2016/11/9.
 */
$(function () {
    bootbox.setDefaults("locale", "zh_CN"); //设置弹出框按钮为中文
    $('a.del-item-normal').click(function (e) {
        e.preventDefault();
        var that = $(this);
        var msg = that.attr('msg') || '你确定要删除该项吗，删除后将不可恢复！';
        bootbox.confirm(msg, function (result) {
            if (result) {
                var link = that.attr('href');
                if (link && link != 'javascript:;') {
                    window.location.href = link;
                }
            }
        });
    });
    //日期控件初始化
    $('.datepicker').datepicker({
        language: "zh-CN",
        autoclose: true,//选中之后自动隐藏日期选择框
        clearBtn: true,//清除按钮
        format: "yyyy-mm-dd",//日期格式
    });
});
